package com.cndw.kungfu.controller;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

import org.springframework.beans.factory.annotation.Autowired;

import com.cndw.kungfu.comm.CommInspection;
import com.cndw.kungfu.comm.JXSpreadTask;
import com.cndw.kungfu.comm.tencent.LogFieldType;
import com.cndw.kungfu.comm.tencent.QQDC;
import com.cndw.kungfu.config.Constants;
import com.cndw.kungfu.config.ConstantsAct;
import com.cndw.kungfu.config.ConstantsCore;
import com.cndw.kungfu.config.ConstantsCost;
import com.cndw.kungfu.config.ConstantsDailyItem;
import com.cndw.kungfu.config.ConstantsDayIntKey;
import com.cndw.kungfu.config.ConstantsIntKey;
import com.cndw.kungfu.config.ConstantsLog;
import com.cndw.kungfu.config.ConstantsModel;
import com.cndw.kungfu.config.GoodsEffectConfig;
import com.cndw.kungfu.domain.Goods;
import com.cndw.kungfu.domain.GoodsMode;
import com.cndw.kungfu.domain.Player;
import com.cndw.kungfu.domain.Recharge;
import com.cndw.kungfu.domain.TaskMode;
import com.cndw.kungfu.domain.Undercity;
import com.cndw.kungfu.ext.LanguageLib;
import com.cndw.kungfu.ext.NumberProcesser;
import com.cndw.kungfu.ext.TimeProcesser;
import com.cndw.kungfu.model.Context;
import com.cndw.kungfu.model.DataStaticCenter;
import com.cndw.kungfu.model.activity.ActivityManager;
import com.cndw.kungfu.model.activity.LotteryManager;
import com.cndw.kungfu.model.activity.domain.WorldBoos;
import com.cndw.kungfu.model.disciple.PlayerMartial;
import com.cndw.kungfu.model.disciple.domain.Disciple;
import com.cndw.kungfu.model.general.GeneralManager;
import com.cndw.kungfu.model.goods.domain.ModeGoodsStarSuit;
import com.cndw.kungfu.model.goods.domain.SubPops;
import com.cndw.kungfu.model.goods.domain.SysModeAwards;
import com.cndw.kungfu.model.sys.LogManager;
import com.cndw.kungfu.model.sys.LogServer;
import com.cndw.kungfu.vo.goodsvo.SubPopsVO;
import com.cndw.rpg.annotation.Controller;
import com.cndw.rpg.framework.ResponseMessage;
import com.cndw.rpg.framework.Session;

/**
 * 一些活动的接口
 * 
 * @author fantadust [9677889@qq.com]
 * @date 2011-11-7 下午10:30:01
 */
@Controller
public class ActivityController {

	@Autowired
	public ActivityManager activityManager;
	@Autowired
	private LotteryManager lotteryManager;
	@Autowired
	private GeneralManager generalManager;
	@Autowired
	private LogManager logManager;

	/**
	 * 显示活动面板
	 * 
	 * @param session
	 * @param panelId
	 * @return
	 */
	public ResponseMessage showPanel(Session session, int panelId) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		Map<Object, Object> paraMap = new HashMap<Object, Object>();
		switch (panelId) {
		case 1:// 日常活动
			paraMap.put(2, player.getDataInfo().getEveryDay().getTaskTimes(TaskMode.typeUnionCycle));// 2跑环任务
			paraMap.put(3, player.getDataInfo().getEveryDay().getTaskTimes(TaskMode.typePrestige));// 3声望任务
			paraMap.put(4, player.getDataInfo().getEveryDay().getTaskTimes(TaskMode.typeDaily));// 日常任务

			boolean isOk = (player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.dailyItem) & (1 << ConstantsDailyItem.challengeWorldBossItem)) > 0;
			boolean haveGot = (player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.tokenGot) & Constants.tokenBoss) > 0;

			paraMap.put(101, haveGot ? 2 : isOk ? 1 : 0);
			break;
		case 2:// 经验获得
			int count = 0;
			for (int udId : ConstantsModel.undercityExp) {
				if (Context.getUndercityServer().getUndercity(udId).getLevel() <= player.getLevel()) {
					count += player.getDataInfo().getEveryDay().getUndercityTimes(udId);
				}
			}
			paraMap.put(16, count);// 经验副本进入次数
			paraMap.put(17, generalManager.getOfflineExpTodayCounts(session.getUid(), TimeProcesser.getMorningTime()));// 经验找回次数
			int ucId = 901;
			paraMap.put(18, player.getDataInfo().getEveryDay().getUndercityTimes(ucId));// 神兵阵进入次数
			int buyNum = player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.ucSCpBuyEn);
			Undercity uc = Context.getUndercityServer().getUndercity(ucId);
			paraMap.put("maxInSbz", uc.getTimes() + buyNum);// 神兵阵上限次数
			paraMap.put(20, player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.ucPCpEn));// 通天图次数
			paraMap.put(21, player.getDataInfo().getEveryDay().getTaskTimes(TaskMode.typeDart));// 押镖次数
			paraMap.put(22, player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.dartKill));// 劫镖押镖次数

			break;
		case 3:
			paraMap.put(33, player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.fht));
			break;
		case 902:
			int enterTimes = player.getDataInfo().getEveryDay().getUndercityTimes(902);
			int buyTimes = player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.gemBuy);
			paraMap.put("enterTime", enterTimes);
			paraMap.put("haveTime", buyTimes + 1 - enterTimes);
			paraMap.put("costGold", Context.getUndercityServer().getBuyCost(buyTimes + 1));
			paraMap.put("rateDoubleCost", Context.getUndercityServer().getBuyRateCost(enterTimes + 1));

		default:
			break;
		}

		QQDC.getInstance().logClick(player, LogFieldType.activity);

		return ResponseMessage.getSuccMessage(paraMap);
	}

	/**
	 * boss上次击杀者
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage bossKiller(Session session) {
		Collection<WorldBoos> bossList = WorldBoos.getAll();
		List<Object> killMap = new ArrayList<Object>();
		for (WorldBoos e : bossList) {
			if (e.getLastKillerId() <= 0) {
				continue;
			}
			killMap.add(new Object[] { e.getId(), e.getLastKillerId(), e.getLastKillerName(), e.getLastRefresh(), e.getLastClac() });
		}

		return ResponseMessage.getSuccMessage(killMap);
	}

	/**
	 * 显示排行
	 * 
	 * @param session
	 * @param boosId
	 * @return
	 */
	public ResponseMessage bossRanking(Session session, int boosId) {
		WorldBoos worldBoos = WorldBoos.getById(boosId);
		if (worldBoos == null) {
			return null;
		}
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("damList", worldBoos.getAkList());
		return ResponseMessage.getSuccMessage(map);
	}

	/**
	 * 获取每日引导信息
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage showLoginAward(Session session) {
		Map<String, Object> resMap = new HashMap<String, Object>();
		long playerId = session.getUid();
		Player player = Context.getPlayerServer().getByPlayerId(playerId);
		if (player.getTodayOnLine() >= 3600 * 3) {
			player.getDataInfo().getEveryDay().finishDailyItem(ConstantsDailyItem.online3hour);
		}
		resMap.put("relogNum", player.getDataInfo().intDataGet(ConstantsIntKey.relogNum));
		int dailyScore = player.getDataInfo().getEveryDay().getDailyScore();
		resMap.put("dailyScore", dailyScore);
		resMap.put("finishedItems", player.getDataInfo().getEveryDay().getDailyItem());
		Map<Integer, SubPopsVO> relogPrize = new HashMap<Integer, SubPopsVO>();
		for (int i = 0; i < ConstantsDailyItem.relogPrize.length; i++) {
			SysModeAwards awards = SysModeAwards.get(ConstantsDailyItem.relogPrize[i]);
			relogPrize.put(i + 1, Context.getGoodsServer().makeAwards(awards.getSubPopsList()));
		}
		resMap.put("relogPrize", relogPrize);
		resMap.put("relogAward", player.getDataInfo().getEveryDay().isLogAward());
		Map<Integer, Map<Object, Object>> scorePrize = new HashMap<Integer, Map<Object, Object>>();
		for (Entry<Integer, Integer[]> entry : ConstantsDailyItem.scorePrize.entrySet()) {
			Map<Object, Object> score = new HashMap<Object, Object>();
			SysModeAwards awards = SysModeAwards.get(entry.getValue()[1]);
			score.put("prize", Context.getGoodsServer().makeAwards(awards.getSubPopsList()));
			if (entry.getKey() <= dailyScore && (!player.getDataInfo().getEveryDay().isScoreAward(entry.getValue()[0]))) {
				score.put("scoreAward", true);
			} else {
				score.put("scoreAward", false);
			}
			scorePrize.put(entry.getKey(), score);
		}
		resMap.put("scorePrize", scorePrize);
		QQDC.getInstance().logClick(player, LogFieldType.awardLogin);
		return ResponseMessage.getSuccMessage(resMap);
	}

	/**
	 * 登陆领奖
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage relogAward(Session session) {
		long playerId = session.getUid();
		Player player = Context.getPlayerServer().getByPlayerId(playerId);
		int relogNum = player.getDataInfo().intDataGet(ConstantsIntKey.relogNum);
		if (player.getLastLogin() < TimeProcesser.getMorningTime()) {
			relogNum = relogNum % 7 + 1;
		}
		if (player.getDataInfo().getEveryDay().isLogAward() || relogNum < 1 || relogNum > 7) {
			return ResponseMessage.errMsg(LanguageLib.get("comm.err.args"));
		}
		StringBuffer logSb = new StringBuffer();
		SysModeAwards award = SysModeAwards.get(ConstantsDailyItem.relogPrize[relogNum - 1]);
		List<SubPops> goods = award.getSubPopsList();
		if (!player.getPlayerBoxs().checkBlack(goods.size())) {
			return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.player.boxmin", goods.size()));
		}
		Context.getGoodsServer().giveSubPops(goods, player, logSb);
		LogServer.recordLog(player, ConstantsLog.goods, 70012, logSb.toString());
		player.getDataInfo().getEveryDay().setLogAward(true);
		player.getDataInfo().intDataSet(ConstantsIntKey.relogNum, relogNum);// 重新覆蓋
		player.getDataInfo().commitSync();

		return ResponseMessage.getSuccMessage(true);
	}

	/**
	 * 每日项目领奖
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage dailyItemAward(Session session, int score) {
		long playerId = session.getUid();
		Player player = Context.getPlayerServer().getByPlayerId(playerId);
		if (player.getDataInfo().getEveryDay().getDailyScore() < score) {
			return ResponseMessage.errMsg(LanguageLib.get("comm.err.args"));
		}
		int scoreType = ConstantsDailyItem.scorePrize.get(score)[0];
		if (player.getDataInfo().getEveryDay().isScoreAward(scoreType)) {
			return ResponseMessage.errMsg(LanguageLib.get("comm.err.args"));
		}
		StringBuffer logSb = new StringBuffer();
		SysModeAwards award = SysModeAwards.get(ConstantsDailyItem.scorePrize.get(score)[1]);
		List<SubPops> goods = award.getSubPopsList();
		if (!player.getPlayerBoxs().checkBlack(goods.size())) {
			return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.player.boxmin", goods.size()));
		}
		Context.getGoodsServer().giveSubPops(goods, player, logSb);
		LogServer.recordLog(player, ConstantsLog.goods, 70013, logSb.toString());
		player.getDataInfo().getEveryDay().addScoreAward(scoreType);
		player.getDataInfo().commitSync();
		return ResponseMessage.getSuccMessage(true);
	}

	/**
	 * 活动的奖励展示
	 * 
	 * @param session
	 * @param activityId
	 * @return
	 */
	public ResponseMessage activityAwardShow(Session session, int activityId) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		final int morningTime = TimeProcesser.getMorningTime();

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("beginTime", ConstantsCore.getActivityBegin());

		boolean canGot = false;
		boolean haveGot = false;
		int lastId = 0;
		switch (activityId) {
		case 11:// 首冲礼包
			if (player.getDataInfo().intDataGet(ConstantsIntKey.payCash) == 0) {
				break;
			}

			Recharge xrecharge = Context.getBusinessServer().selectFirst(player.getPlayerId());
			if (xrecharge == null) {
				break;
			} else if (xrecharge.getCreateDate() <= ConstantsCore.activityBeginTime) {// 维护前的人都领取过了
				// haveGot = true;
				// break;
			} else if (xrecharge.getCreateDate() > ConstantsCore.getActivityEnd()) {
				// break;
			}

			canGot = player.getDataInfo().intDataGet(ConstantsIntKey.aPayFirst) == 0;
			haveGot = player.getDataInfo().intDataGet(ConstantsIntKey.aPayFirst) > 0;

			map.put("cGold", xrecharge.getGold());

			break;
		case 12:// 限时购买
			int lastTime = Context.getSyncServer().selectLastBuyTime(player.getPlayerId(), ConstantsCore.buyLimitId);
			canGot = lastTime < morningTime;
			haveGot = lastTime >= morningTime;
			break;
		case 1:// 桃李满天下
			PlayerMartial playerMartial = Context.getDiscipleServer().getByPlayerId(player.getPlayerId());
			int qualityNum3 = 0,
			qualityNum4 = 0;
			lastId = player.getDataInfo().intDataGet(ConstantsIntKey.aDisNum);
			map.put("lastId", lastId);

			Collection<Disciple> disciples = playerMartial.getDisciples();
			for (Disciple e : disciples) {
				if (e.getCreateTime() > ConstantsCore.getActivityEnd()) {
					continue;
				}
				if (e.getQuality() == 3) {
					qualityNum3++;
				}
				if (e.getQuality() == 4) {
					qualityNum4++;
				}
			}
			if (qualityNum3 < 1 && qualityNum4 < 1) {

				break;
			}

			int canId = 0;
			int[][] config = ConstantsModel.activityDC;

			for (int i = 0; i < config.length; i++) {
				int keyId = i + 1;
				if ((lastId & (1 << keyId)) > 0) {
					continue;
				}
				int[] oneX = config[i];
				if (qualityNum3 >= oneX[0] && qualityNum4 >= oneX[1]) {
					canId = canId | (1 << keyId);
					canGot = true;
				}
			}

			map.put("canId", canId);
			break;
		case 2:// 侠义施恩
			int[] configx = { 500, 1000, 3000, 5000, 10000 };
			lastId = player.getDataInfo().getEveryDay().intDataGet(ConstantsIntKey.aLottery);
			map.put("lastId", lastId);
			if (lastId >= configx.length) {
				break;
			}
			int total = lotteryManager.setTotal(session.getUid(), 0, morningTime, ConstantsCore.getActivityEnd());
			int canyId = lastId;
			for (int i = 0; i < configx.length; i++) {
				if (configx[i] <= total) {
					canyId = i + 1;
				}
			}
			map.put("canId", canyId);
			if (configx[lastId] <= total) {
				canGot = true;
			}

			break;
		case 3:// 特训次数 满门精英
			PlayerMartial martial = Context.getDiscipleServer().getByPlayerId(player.getPlayerId());
			int[] levelNums = new int[21];
			for (Disciple e : martial.getDisciples()) {
				for (int i = 1; i <= e.getDevilTimes(); i++) {
					levelNums[i]++;
				}
			}
			int[][] config1 = ConstantsModel.activityDCDeiv;
			lastId = player.getDataInfo().intDataGet(ConstantsIntKey.aDisTrain);
			map.put("lastId", lastId);
			if (lastId < 0 || lastId >= config1.length) {
				haveGot = true;
				break;
			}
			int canxId = lastId;
			for (int i = lastId; i < config1.length; i++) {
				if (levelNums[config1[i][0]] >= config1[i][1]) {
					canxId = i + 1;
					canGot = true;
				}
			}
			map.put("canId", canxId);

			break;
		case 4:// 升星奖励
			lastId = player.getDataInfo().intDataGet(ConstantsIntKey.aEquip);
			Collection<Goods> equipGoods = player.getPlayerBoxs().getEquipList();
			canId = ModeGoodsStarSuit.getMaxStar(equipGoods);
			canId = canId <= lastId ? lastId : canId;
			canGot = canId > lastId && canId >= 7;
			map.put("lastId", lastId);
			map.put("canId", canId);
			break;

		default:
			break;
		}

		map.put("canGot", canGot);
		if (haveGot) {
			map.put("haveGot", haveGot);
		}

		if (activityId == 11) {
			QQDC.getInstance().logClick(player, LogFieldType.awardPayFirst);
		} else {
			QQDC.getInstance().logClick(player, LogFieldType.awardOpenServer);
		}

		return ResponseMessage.getSuccMessage(map);
	}

	/**
	 * 领取首冲礼包
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage activityPayFirst(Session session) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());

		if (player.getDataInfo().intDataGet(ConstantsIntKey.payCash) == 0) {
			return null;
		} else if (player.getDataInfo().intDataGet(ConstantsIntKey.aPayFirst) > 0) {
			return null;
		}

		Recharge recharge = Context.getBusinessServer().selectFirst(player.getPlayerId());
		if (recharge == null) {
			return null;
		} else if (recharge.getCreateDate() <= ConstantsCore.activityBeginTime) {// 维护前的人都领取过了
			// player.getDataInfo().intDataSet(ConstantsIntKey.aPayFirst, 1);
			// return null;
		} else if (recharge.getCreateDate() >= ConstantsCore.getActivityEnd()) {
			// return null;
		}

		int grade = NumberProcesser.nearMaxIndex(ConstantsCore.payFirstGrade, recharge.getGold());
		if (grade == 0) {
			return null;
		}
		StringBuffer logSB = new StringBuffer();
		SysModeAwards sysAwards = SysModeAwards.get(111, grade);
		if (sysAwards != null) {
			List<SubPops> subPops = sysAwards.getSubPopsList();
			int black = Context.getGoodsServer().checkSubPopsBlack(subPops);
			if (!player.getPlayerBoxs().checkBlack(black)) {
				return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.player.boxmin", black));
			}
			Context.getGoodsServer().giveSubPops(subPops, player, logSB, ConstantsCost.gotPayFirst);
		}
		LogServer.recordLog(player, ConstantsLog.activity, 90001, grade, logSB.toString());

		player.getDataInfo().intDataSet(ConstantsIntKey.aPayFirst, 1);
		player.getDataInfo().commitSync();

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("gold", player.getGold());
		map.put("goldBing", player.getGoldBing());

		return ResponseMessage.getSuccMessage(map);
	}

	/**
	 * 徒弟奖励领取
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage activityDiscipleNum(Session session) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		PlayerMartial playerMartial = Context.getDiscipleServer().getByPlayerId(player.getPlayerId());
		int qualityNum3 = 0, qualityNum4 = 0;
		Collection<Disciple> disciples = playerMartial.getDisciples();
		for (Disciple e : disciples) {
			if (e.getCreateTime() > ConstantsCore.getActivityEnd()) {
				continue;
			}
			if (e.getQuality() == 3) {
				qualityNum3++;
			}
			if (e.getQuality() == 4) {
				qualityNum4++;
			}
		}
		if (qualityNum3 < 1 && qualityNum4 < 1) {
			return null;
		}
		int LastId = player.getDataInfo().intDataGet(ConstantsIntKey.aDisNum);
		int[][] config = ConstantsModel.activityDC;
		int giveNums = 0;
		StringBuffer aId = new StringBuffer();
		for (int i = 0; i < config.length; i++) {
			int keyId = i + 1;
			if ((LastId & (1 << keyId)) > 0) {
				continue;
			}
			int[] oneX = config[i];
			if (qualityNum3 >= oneX[0] && qualityNum4 >= oneX[1]) {
				LastId = LastId | (1 << keyId);
				giveNums += oneX[2];
				aId.append(keyId).append(",");
			}
		}
		if (giveNums == 0) {
			return null;
		} else if (!player.getPlayerBoxs().checkBlack()) {
			return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.player.boxmin", 1));
		}
		player.getDataInfo().intDataSet(ConstantsIntKey.aDisNum, LastId);
		player.getDataInfo().commitSync();
		Context.getGoodsServer().giveGoodsBing(player.getPlayerId(), GoodsEffectConfig.getDiscipleReinGoodsId(), giveNums, 1);
		LogServer.recordLog(player, ConstantsLog.activity, 90004, giveNums, aId.toString());

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("LastId", LastId);
		map.put("gold", player.getGold());
		map.put("goldBing", player.getGoldBing());
		map.put("asset", player.getAsset());

		return ResponseMessage.getSuccMessage(map);
	}

	/**
	 * 领取特训次数的奖励
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage activityDiscipleTrain(Session session) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		PlayerMartial playerMartial = Context.getDiscipleServer().getByPlayerId(player.getPlayerId());

		int[] levelNums = new int[21];
		Collection<Disciple> disciples = playerMartial.getDisciples();
		for (Disciple e : disciples) {
			for (int i = 1; i <= e.getDevilTimes(); i++) {
				levelNums[i]++;
			}
		}
		int[][] config = ConstantsModel.activityDCDeiv;
		int lastId = player.getDataInfo().intDataGet(ConstantsIntKey.aDisTrain);
		if (lastId < 0 || lastId >= config.length) {
			return null;
		}
		if (levelNums[config[lastId][0]] < config[lastId][1]) {// 判断本次有没达成
			return null;
		}

		StringBuffer logSB = new StringBuffer();
		SysModeAwards sysAwards = SysModeAwards.get(120, lastId + 1);
		if (sysAwards != null) {
			List<SubPops> subPops = sysAwards.getSubPopsList();
			int black = Context.getGoodsServer().checkSubPopsBlack(subPops);
			if (!player.getPlayerBoxs().checkBlack(black)) {
				return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.player.boxmin", black));
			}
			Context.getGoodsServer().giveSubPops(subPops, player, logSB, ConstantsCost.gotDisciple);
		}
		player.getDataInfo().intDataSet(ConstantsIntKey.aDisTrain, lastId + 1);
		player.getDataInfo().commitSync();
		player.commitSync();
		LogServer.recordLog(player, ConstantsLog.activity, 90005, lastId + 1, logSB.toString());

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("gold", player.getGold());
		map.put("goldBing", player.getGoldBing());
		map.put("asset", player.getAsset());
		return ResponseMessage.getSuccMessage(map);
	}

	/**
	 * 领取装备升星的奖励
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage activityEquipStar(Session session) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		int starId = player.getDataInfo().intDataGet(ConstantsIntKey.aEquip);
		int nowStar = starId + 1;
		nowStar = nowStar <= 7 ? 7 : nowStar;

		Collection<Goods> equipGoods = player.getPlayerBoxs().getEquipList();
		int star = ModeGoodsStarSuit.getMaxStar(equipGoods);
		if (nowStar > star) {// 要领取的等级大于当前等级
			return null;
		}

		StringBuffer logSB = new StringBuffer();
		SysModeAwards sysAwards = SysModeAwards.get(121, nowStar);
		if (sysAwards != null) {
			List<SubPops> subPops = sysAwards.getSubPopsList();
			int black = Context.getGoodsServer().checkSubPopsBlack(subPops);
			if (!player.getPlayerBoxs().checkBlack(black)) {
				return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.player.boxmin", black));
			}
			Context.getGoodsServer().giveSubPops(subPops, player, logSB, ConstantsCost.gotStar);
		}
		player.getDataInfo().intDataSet(ConstantsIntKey.aEquip, nowStar);
		player.getDataInfo().commitSync();
		player.commitSync();
		LogServer.recordLog(player, ConstantsLog.activity, 90006, nowStar, logSB.toString());

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("gold", player.getGold());
		map.put("goldBing", player.getGoldBing());
		map.put("asset", player.getAsset());
		return ResponseMessage.getSuccMessage(map);
	}

	/**
	 * 领取抽奖的额外奖励
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage activityLottery(Session session) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		int[] config = { 500, 1000, 3000, 5000, 10000 };
		int lastId = player.getDataInfo().getEveryDay().intDataGet(ConstantsIntKey.aLottery);
		if (lastId >= config.length) {
			return null;
		}
		int total = lotteryManager.setTotal(session.getUid(), 0, TimeProcesser.getMorningTime(), ConstantsCore.getActivityEnd());
		if (config[lastId] > total) {
			return null;
		}
		lastId++;
		StringBuffer logSB = new StringBuffer();
		SysModeAwards sysAwards = SysModeAwards.get(122, lastId);
		if (sysAwards != null) {
			List<SubPops> subPops = sysAwards.getSubPopsList();
			int black = Context.getGoodsServer().checkSubPopsBlack(subPops);
			if (!player.getPlayerBoxs().checkBlack(black)) {
				return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.player.boxmin", black));
			}
			Context.getGoodsServer().giveSubPops(subPops, player, logSB, ConstantsCost.gotLottery);
		}
		player.getDataInfo().getEveryDay().intDataSet(ConstantsIntKey.aLottery, lastId);
		player.getDataInfo().commitSync();
		player.commitSync();
		LogServer.recordLog(player, ConstantsLog.activity, 90007, lastId, logSB.toString());

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("gold", player.getGold());
		map.put("goldBing", player.getGoldBing());

		return ResponseMessage.getSuccMessage(map);
	}

	public ResponseMessage activityCostFeedsShow(Session session) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		final int morningTime = TimeProcesser.getMorningTime();
		int lastId = player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.aFeed);
		int begintTime = morningTime >= ConstantsCore.getDiscipleFeedBeginTime() ? morningTime : ConstantsCore.getDiscipleFeedBeginTime();
		int totalGold = logManager.selectCostSum(session.getUid(), begintTime, ConstantsCore.getDiscipleFeedEndTime(), ConstantsCore.discipleEventIds);
		int[] configx = ConstantsModel.activityFeedGold;
		int canId = 0;
		for (int i = 0; i < configx.length; i++) {
			if (configx[i] <= totalGold) {
				canId = i + 1;
			}
		}
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("beginTime", ConstantsCore.getDiscipleFeedBeginTime());// 重置时间
		map.put("canId", canId);// 可点击的
		map.put("lastId", lastId);// 已点击过的
		map.put("canGot", lastId < canId);
		QQDC.getInstance().logClick(player, LogFieldType.activitySpecial);
		return ResponseMessage.getSuccMessage(map);
	}

	public ResponseMessage activityCostFeedsGot(Session session) {
		int morningTime = TimeProcesser.getMorningTime();
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		int[] config = ConstantsModel.activityFeedGold;
		int lastId = player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.aFeed);
		if (lastId >= config.length) {
			return null;
		}
		int begintTime = morningTime >= ConstantsCore.getDiscipleFeedBeginTime() ? morningTime : ConstantsCore.getDiscipleFeedBeginTime();

		int totalGold = logManager.selectCostSum(session.getUid(), begintTime, ConstantsCore.getDiscipleFeedEndTime(), ConstantsCore.discipleEventIds);
		if (config[lastId] > totalGold) {
			return null;
		}
		lastId++;
		StringBuffer logSB = new StringBuffer();
		SysModeAwards sysAwards = SysModeAwards.get(124, lastId);
		if (sysAwards != null) {
			List<SubPops> subPops = sysAwards.getSubPopsList();
			int black = Context.getGoodsServer().checkSubPopsBlack(subPops);
			if (!player.getPlayerBoxs().checkBlack(black)) {
				return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.player.boxmin", black));
			}
			Context.getGoodsServer().giveSubPops(subPops, player, logSB, ConstantsCost.gotLottery);
		}
		player.getDataInfo().getEveryDay().intDataSet(ConstantsDayIntKey.aFeed, lastId);
		player.getDataInfo().commitSync();
		player.commitSync();
		LogServer.recordLog(player, ConstantsLog.activity, 90011, lastId, logSB.toString());

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("gold", player.getGold());
		map.put("goldBing", player.getGoldBing());
		return ResponseMessage.getSuccMessage(map);
	}

	/**
	 * 领取黄钻奖励
	 * 
	 * @param session
	 * @param type
	 *            0 新手礼包 1每日登陆奖励 2年费玩家每日奖励 3 3366奖励
	 * @return
	 */
	public ResponseMessage yellowVipPrize(Session session, int type) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		int yellowLevel = player.getDataInfo().getYLevel();
		int lv3 = player.getDataInfo().getLv3();
		boolean yelYear = player.getDataInfo().isYYear();
		if (type < 0 || type > 3) {
			return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.err.args"));
		}
		if ((type < 2 && yellowLevel <= 0) || (type == 2 && !yelYear)) {// 不是黄钻玩家
			return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.err.args"));
		}
		if (type == 3 && lv3 <= 0) {
			return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.err.args"));
		}
		int rootId = 0;
		int typeId = 0;
		switch (type) {
		case 0:
			if ((player.getDataInfo().intDataGet(ConstantsIntKey.yelPrize) & 1) > 0) {
				return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.err.args"));
			}
			rootId = 1500;
			typeId = 1;
			break;
		case 1:
			if (player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.yelDPrize) > 0) {
				return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.err.args"));
			}
			rootId = 1501;
			typeId = yellowLevel;
			break;
		case 2:
			if (player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.yelYDPrize) > 0) {
				return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.err.args"));
			}
			rootId = 1502;
			typeId = 1;
			break;
		case 3:// 领取蓝钻每日奖励
			if (player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.pf3DPrize) > 0) {
				return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.err.args"));
			}
			rootId = 1503;
			typeId = lv3;
			break;
		default:
			return null;
		}

		StringBuffer logSB = new StringBuffer();
		SysModeAwards sysAwards = SysModeAwards.get(rootId, typeId);
		if (sysAwards != null) {
			List<SubPops> subPops = sysAwards.getSubPopsList();
			int black = Context.getGoodsServer().checkSubPopsBlack(subPops);
			if (!player.getPlayerBoxs().checkBlack(black)) {
				return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.player.boxmin", black));
			}
			Context.getGoodsServer().giveSubPops(subPops, player, logSB);
			if (type == 0) {
				int yelPrize = player.getDataInfo().intDataGet(ConstantsIntKey.yelPrize);
				player.getDataInfo().intDataSet(ConstantsIntKey.yelPrize, yelPrize | 1);
				player.commitSync();
			} else if (type == 1) {
				player.getDataInfo().getEveryDay().intDataSet(ConstantsDayIntKey.yelDPrize, 1);
				player.getDataInfo().commitSync();
			} else if (type == 2) {
				player.getDataInfo().getEveryDay().intDataSet(ConstantsDayIntKey.yelYDPrize, 1);
				player.getDataInfo().commitSync();
			} else if (type == 3) {
				player.getDataInfo().getEveryDay().intDataSet(ConstantsDayIntKey.pf3DPrize, 1);
				player.getDataInfo().commitSync();
			}
		}

		LogServer.recordLog(player, ConstantsLog.activity, 90010, rootId * 100 + typeId, logSB.toString(),type,player.getDataInfo().getPf(),yellowLevel,yelYear);
		return ResponseMessage.getSuccMessage(true);
	}

	/**
	 * 黄钻第一次的奖励
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage yellowVipSecond(Session session) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		if (player.getDataInfo().getYLevel() == 0) {
			return null;
		}
		int yelPrize = player.getDataInfo().intDataGet(ConstantsIntKey.yelPrize);
		if ((yelPrize & 2) > 0) {
			return null;
		}
		if (!player.getPlayerBoxs().checkBlack()) {
			return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.player.boxmin", 1));
		}
		player.getDataInfo().intDataSet(ConstantsIntKey.yelPrize, yelPrize | 2);
		player.getDataInfo().commitSync();
		Context.getGoodsServer().giveGoodsBing(session.getUid(), GoodsEffectConfig.yellowVipPet, 1, 1);
		GoodsMode goodsMode = Context.getGoodsServer().getModeById(GoodsEffectConfig.yellowVipPet);
		LogServer.recordLog(player, ConstantsLog.activity, 90010, 2, goodsMode.getName(),11,player.getDataInfo().getPf());
		return ResponseMessage.getSuccMessage(true);
	}

	/**
	 * 领取黄钻每日俸禄
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage yellowVipSalary(Session session) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		if (player.getDataInfo().getYLevel() == 0) {
			return null;
		}
		if (player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.yelSalary) > 0) {
			return null;
		}
		int asset = player.getLevel() * ConstantsModel.prayAsset;
		player.getDataInfo().getEveryDay().intDataSet(ConstantsDayIntKey.yelSalary, 1);
		player.alterAsset(asset);
		player.commitSync();
		player.getDataInfo().commitSync();

		LogServer.recordLog(player, ConstantsLog.activity, 90010, 3, asset,12,player.getDataInfo().getPf());

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("asset", player.getAsset());
		map.put("got", asset);
		return ResponseMessage.getSuccMessage(map);
	}

	/**
	 * 即时更新黄钻等vip信息
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage vipRefresh(Session session) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		if (player.getDataInfo().isGmLogin()) {
			return null;
		}
		Map<String, String> apiMap = CommInspection.isVip(player);
		if (apiMap != null && !apiMap.isEmpty()) {
			int yLevel = apiMap.containsKey("yellow_vip_level") ? Integer.valueOf(apiMap.get("yellow_vip_level").toString()) : 0;
			boolean yYear = apiMap.containsKey("is_yellow_year_vip") ? Integer.valueOf(apiMap.get("is_yellow_year_vip").toString()) == 1 : false;

			player.getDataInfo().setYLevel(yLevel);
			player.getDataInfo().setYYear(yYear);
		}
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("yLevel", player.getDataInfo().getYLevel());
		map.put("YYear", player.getDataInfo().isYYear());

		return ResponseMessage.getSuccMessage(map);
	}

	/**
	 * 显示折扣券
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage pubacct(Session session) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		int[] pubaccts = new int[3];
		if (!player.getDataInfo().isGmLogin()) {
			pubaccts = CommInspection.pubacct(player);
		}
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("pubbacts", pubaccts);
		return ResponseMessage.getSuccMessage(map);
	}

	/**
	 * 黄钻奖励
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage showYellowPrize(Session session) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		Map<Object, Object> map = new HashMap<Object, Object>();
		map.put("yelLevel", player.getDataInfo().getYLevel());
		map.put("yelVipYear", player.getDataInfo().isYYear());
		map.put("firstGet", (player.getDataInfo().intDataGet(ConstantsIntKey.yelPrize) & 1) > 0);// 新手礼包
		map.put("secondGet", (player.getDataInfo().intDataGet(ConstantsIntKey.yelPrize) & 2) > 0);// 宠物礼包
		map.put("salaryGet", player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.yelSalary) > 0);// 俸禄
		map.put("dailyGet", player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.yelDPrize) > 0);
		map.put("yearDailyGet", player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.yelYDPrize) > 0);
		Map<String, Object> temp = new HashMap<String, Object>();
		for (int i = 1; i <= ConstantsModel.yelMaxLevel; i++) {
			temp.put(String.valueOf(i), Context.getGoodsServer().makeAwards(SysModeAwards.get(1501, i).getSubPopsList()));
		}
		map.put("dailyPrize", temp);
		map.put("yearDailyPrize", Context.getGoodsServer().makeAwards(SysModeAwards.get(1502, 1).getSubPopsList()));

		QQDC.getInstance().logClick(player, LogFieldType.awardYellow);
		return ResponseMessage.getSuccMessage(map);
	}

	/**
	 * 显示3366奖励
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage show3366Prize(Session session) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		Map<Object, Object> map = new HashMap<Object, Object>();
		Map<String, Object> temp = new HashMap<String, Object>();
		for (int i = 1; i <= 6; i++) {
			temp.put(String.valueOf(i), Context.getGoodsServer().makeAwards(SysModeAwards.get(1503, i).getSubPopsList()));
		}
		map.put("lv3", player.getDataInfo().getLv3());
		map.put("dailyPrize", temp);
		map.put("dailyGet", player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.pf3DPrize));
		QQDC.getInstance().logClick(player, LogFieldType.awardPf3);
		return ResponseMessage.getSuccMessage(map);
	}

	/**
	 * open api 回調
	 * 
	 * @param session
	 * @param type
	 * @return
	 */
	public ResponseMessage callbackStory(Session session, Object type) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		int stype = Integer.valueOf(type.toString());
		if (stype == 1 || stype == 2) {
			QQDC.getInstance().logClick(player, LogFieldType.sendStory);
		}

		if (stype == 2) {
			int inviteNum = player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.invite);
			if (inviteNum < ConstantsModel.qqInviteNum) {
				inviteNum++;
				player.getDataInfo().getEveryDay().intDataSet(ConstantsDayIntKey.invite, inviteNum);
				JXSpreadTask.complete(player, JXSpreadTask.invite);
			}

		} else if (stype >= 3000) {// 300以上全部记录入库
			QQDC.getInstance().logClick(player, stype);
			if (stype == 3000) {
				DataStaticCenter.flashMJOpen(session.getUid(), true);
				if (player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.zbg)==0) {
					if (TimeProcesser.inTimePeriod(11*3600, 14*3600) || TimeProcesser.inTimePeriod(19*3600, 24*3600) || TimeProcesser.inTimePeriod(0, 3600)) {
						if (player.getPlayerBoxs().checkBlack()) {
							Context.getGoodsServer().giveGoodsBing(session.getUid(), GoodsEffectConfig.zhuboawardId, 1, 1);
							player.getDataInfo().getEveryDay().intDataSet(ConstantsDayIntKey.zbg, 1);
							player.getDataInfo().commitSync();
							GoodsMode goodsMode = Context.getGoodsServer().getModeById(GoodsEffectConfig.zhuboawardId);
							LogServer.recordLog(player, ConstantsLog.actNew15, 150101, goodsMode.getName(),goodsMode.getGoodsId());
						}
					}
				}
			} else if (stype == 3001) {
				DataStaticCenter.flashMJOpen(session.getUid(), false);
			}
		}
		return null;
	}

	/**
	 * 邀請好友的獎勵
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage inviteAward(Session session) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		int inviteNum = player.getDataInfo().getEveryDay().intDataGet(ConstantsDayIntKey.invite);
		if (inviteNum == 2) {
			int indexId = NumberProcesser.ceil(player.getLevel(), 10) - 1;
			int asset = ConstantsModel.inviteAsset[indexId];

			player.alterAsset(asset);

			player.getDataInfo().getEveryDay().intDataSet(ConstantsDayIntKey.invite, 3);
		}

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("asset", player.getAsset());
		return ResponseMessage.getSuccMessage(map);
	}

	/**
	 * 冲级活动显示
	 * 
	 * @param session
	 * @param showStep
	 *            要显示可领奖励物品
	 * @return
	 */

	public ResponseMessage upgradeAwardShow(Session session) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("step", player.getDataInfo().intDataGet(ConstantsIntKey.upa));
		return ResponseMessage.getSuccMessage(map);
	}

	/**
	 * 领取冲级活动奖励
	 * 
	 * @param session
	 * @param step
	 * @return
	 */
	public ResponseMessage upgradeAward(Session session, int step) {
		if (step < 1 || step > 6) {
			return null;
		}
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());

		if (player.getLevel() < ConstantsModel.upgradeAwardLv[step - 1]) {
			return null;
		}

		int nextStep = player.getDataInfo().intDataGet(ConstantsIntKey.upa) + 1;
		if (nextStep != step) {
			return null;
		}
		SysModeAwards awards = SysModeAwards.get(101, ConstantsModel.upgradeAwardLv[step - 1]);
		if (awards == null) {
			return null;
		}
		StringBuffer logSB = new StringBuffer();
		if (awards.getSubPopsList() != null) {
			int needSize = Context.getGoodsServer().checkSubPopsBlack(awards.getSubPopsList());
			if (!player.getPlayerBoxs().checkBlack(needSize)) {
				return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.player.boxmin", needSize));
			}
			Context.getGoodsServer().giveSubPops(awards.getSubPopsList(), player, logSB);
		}

		player.getDataInfo().intDataSet(ConstantsIntKey.upa, step);
		player.getDataInfo().commitSync();
		LogServer.recordLog(player, ConstantsLog.activity, 90014, ConstantsModel.upgradeAwardLv[step - 1], logSB.toString(), player.getLevel());
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("step", player.getDataInfo().intDataGet(ConstantsIntKey.upa));
		return ResponseMessage.getSuccMessage(map);
	}
	
	/**
	 * Q空间、朋友网登陆奖励显示
	 * 
	 * @param session
	 * @return
	 */
	public ResponseMessage pfLoginShow(Session session) {
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		
		int step = player.getDataInfo().intDataGet(ConstantsIntKey.tpfg);
		int round = player.getDataInfo().intDataGet(ConstantsIntKey.llr);
		int pfRound = (TimeProcesser.getUnixTime() - ConstantsAct.pfAwardBegin) / (7 * 86400) + 1;
	
		if (round < pfRound) {//重置
			step = 0;
			player.getDataInfo().intDataSet(ConstantsIntKey.tpfg, step);
			player.getDataInfo().intDataSet(ConstantsIntKey.llr, pfRound);
			player.getDataInfo().commitSync();
		}
		boolean forbid = ConstantsAct.pfAwardBegin + pfRound * 7 * 86400 - TimeProcesser.getUnixTime() <= 9 * 3600;  
		Map<String, Object> map = new HashMap<String, Object>();
		if (forbid) {
			map.put("forbid", true);
		}
		map.put("step", step);
		map.put("g", player.getDataInfo().getEveryDay().intDataStatContants(ConstantsDayIntKey.comm, ConstantsDayIntKey.comm_10));
		return ResponseMessage.getSuccMessage(map);
	}
	
	/**
	 * 领取Q空间、朋友网登陆奖励
	 * 
	 * @param session
	 * @param step
	 * @return
	 */
	public ResponseMessage pfLoginAward(Session session, int step) {
		if (step < 1 || step > 7) {
			return null;
		}
		int pfRound = (TimeProcesser.getUnixTime() - ConstantsAct.pfAwardBegin) / (7 * 86400) + 1;
		boolean forbid = ConstantsAct.pfAwardBegin + pfRound * 7 * 86400 - TimeProcesser.getUnixTime() <= 9 * 3600;  
		if (forbid) {
			return null;
		}
		Player player = Context.getPlayerServer().getByPlayerId(session.getUid());
		boolean todayGot = player.getDataInfo().getEveryDay().intDataStatContants(ConstantsDayIntKey.comm, ConstantsDayIntKey.comm_10);
		int awardStep = player.getDataInfo().intDataGet(ConstantsIntKey.tpfg) + 1;
		int round = player.getDataInfo().intDataGet(ConstantsIntKey.llr);
		if (todayGot || awardStep != step || round != pfRound) {
			return null;
		}
		
		StringBuffer logSB = new StringBuffer();
		SysModeAwards sysAwards = SysModeAwards.get(2007, awardStep);
		if (sysAwards != null) {
			List<SubPops> subPops = sysAwards.getSubPopsList();
			int black = Context.getGoodsServer().checkSubPopsBlack(subPops);
			if (!player.getPlayerBoxs().checkBlack(black)) {
				return ResponseMessage.ticpErrMsg(LanguageLib.get("comm.player.boxmin", black));
			}
			Context.getGoodsServer().giveSubPops(subPops, player, logSB);
		}
		player.getDataInfo().getEveryDay().intDataBitStatAdd(ConstantsDayIntKey.comm, ConstantsDayIntKey.comm_10);
		player.getDataInfo().intDataSet(ConstantsIntKey.tpfg, awardStep);
		player.getDataInfo().commitSync();
		LogServer.recordLog(player, ConstantsLog.actNew15, 150103, step, logSB.toString(), pfRound);
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("step", awardStep);
		map.put("g", true);
		return ResponseMessage.getSuccMessage(map);
	}

}
